package com.sample.systemui;

import android.app.Application;
import android.content.Context;
import android.content.Intent;

public class SystemUIApp extends Application {

    private static Application sInstance = null;

    public static void startSystemUIService(Context context) {
        Intent intent = new Intent(context, SystemUIService.class);
        context.startService(intent);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        sInstance = this;
        startSystemUIService(this);
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
    }

    public static Context getMyApplicationContext() {
        Context context = null;
        if(null != sInstance) {
            context = sInstance.getApplicationContext();
        }
        return context;
    }
}
